package com.hnkywl.sts.entity.organ;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Sjzdz;
import com.hnkywl.sts.entity.jhgl.Xy;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * 说明：经营模式
 * 包:        com.hnkywl.sts.entity.organ
 * 类描述:    经营模式
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */
@Entity
@Table(name="T_SYS_JYMS")
@Where(clause = "deleted!='1'")
public class Jyms extends BaseEntity{
    @Id
    @SequenceGenerator(name = "seqJyms", allocationSize = 1, sequenceName = "SEQ_SYS_JSMS")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqJyms")
    private Long id;

    /**
     * 供应核算代码
     */
    private String gyhsdm;

    /**
     * 销售核算代码
     */
    private String xshsdm;

    /**
     * 付款类型
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="SJZDZ_FKLX_ID")
    private Sjzdz fklx;

    /**
     * 统筹方式
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="SJZDZ_TCFS_ID")
    private Sjzdz tcfs;

    /**
     * 统筹公司
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="TCGS_ID")
    private Gsjg tcgs;

    /**
     * 统筹部门
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="TCBM_ID")
    private Gsjg tcbm;

    /**
     *  企业机构
     */
    @OneToOne(fetch = FetchType.LAZY,mappedBy = "jyms",targetEntity = Qyjg.class)
    private Qyjg qyjg;

    /**
     *  企业机构
     */
    @OneToOne(fetch = FetchType.LAZY,mappedBy = "jyms",targetEntity = Xy.class)
    private Xy xy;


    /**
     * 备注
     */
    private String bz;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Xy getXy() {
        return xy;
    }

    public void setXy(Xy xy) {
        this.xy = xy;
    }

    public String getGyhsdm() {
        return gyhsdm;
    }

    public void setGyhsdm(String gyhsdm) {
        this.gyhsdm = gyhsdm;
    }

    public String getXshsdm() {
        return xshsdm;
    }

    public void setXshsdm(String xshsdm) {
        this.xshsdm = xshsdm;
    }

    public Sjzdz getFklx() {
        return fklx;
    }

    public void setFklx(Sjzdz fklx) {
        this.fklx = fklx;
    }

    public Sjzdz getTcfs() {
        return tcfs;
    }

    public void setTcfs(Sjzdz tcfs) {
        this.tcfs = tcfs;
    }

    public Gsjg getTcgs() {
        return tcgs;
    }

    public void setTcgs(Gsjg tcgs) {
        this.tcgs = tcgs;
    }

    public Gsjg getTcbm() {
        return tcbm;
    }

    public void setTcbm(Gsjg tcbm) {
        this.tcbm = tcbm;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public Qyjg getQyjg() {
        return qyjg;
    }

    public void setQyjg(Qyjg qyjg) {
        this.qyjg = qyjg;
    }
}
